import 'package:flutter/material.dart';
import 'package:bmi_cal/components/result_page.dart';

class BottomButtom extends StatelessWidget {
  BottomButtom({
    required this.title, required this.onPressed
  });

  final String title;
  final VoidCallback onPressed;

  @override
  Widget build(BuildContext context) {
    return GestureDetector(
      // 增加跳转页面
      onTap: onPressed,
      child: Container(
            margin: EdgeInsets.symmetric(horizontal: 20.0, vertical: 10.0),
            decoration: BoxDecoration(color: Colors.red, borderRadius: BorderRadius.circular(10.0)),
            alignment: Alignment.center,
            child: Text(title.toUpperCase(), style: TextStyle(color: Colors.white),),
            width: double.infinity,
            height: 50.0,
          ),
    );
  }
}

// 